﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="addedrecord.aspx.vb" Inherits="bookmeetprototype.addedrecord" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="gridviewdetail">

    <asp:GridView ID="GridViewJustAdded" runat="server" AutoGenerateColumns="False" 
        CssClass="dGrid" DataKeyNames="ID" DataSourceID="BookJustAdded" 
        Width="640px">
        <Columns>
            <asp:ImageField DataImageUrlField="imgurl" NullImageUrl="~/img/no_image.jpg">
                <ControlStyle Height="200px" Width="130px" />
            </asp:ImageField>
            <asp:BoundField DataField="Title" HeaderText="Title" 
                SortExpression="Title" />
            <asp:BoundField DataField="Author" HeaderText="Author" 
                SortExpression="Author" />
            <asp:BoundField DataField="AverageRating" HeaderText="Average Rating" 
                SortExpression="AverageRating" />
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="detail.aspx?ID={0}" Text="Details" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="BookJustAdded" runat="server" 
        ConnectionString="<%$ ConnectionStrings:BookMeetConnString %>" 
        ProviderName="<%$ ConnectionStrings:BookMeetConnString.ProviderName %>" 
        
        SelectCommand="SELECT TOP 1 ID, Title, Author, PublicationDate, Pages, Publisher, AverageRating, imgurl, thumburl FROM booklist ORDER BY ID DESC">
    </asp:SqlDataSource><br /><table style="background-color:#FFFFFF" width="200" cellpadding="1" cellspacing="1">
	<tr>
		<td><asp:HyperLink   
            ID="returntolist"   
            runat="server"  
            Text="Return to list"  
            NavigateUrl="~/list.aspx"  
            > 
        </asp:HyperLink></td>
		<td><asp:HyperLink   
            ID="addanotherbook"   
            runat="server"  
            Text="Add Another Book!"  
            NavigateUrl="~/addbook.aspx"  
            >  
        </asp:HyperLink></td>
	</tr>
</table>
</div>
<br />
</asp:Content>
